package com.example.app.dto;

import jakarta.validation.constraints.Max;
import jakarta.validation.constraints.Min;
import jakarta.validation.constraints.Past;
import jakarta.validation.constraints.Size;

public class UserProfileDTO {
    @Size(min = 2, max = 20, message = "姓名长度应在2-20字符之间")
    private String name;

    private String gender;

    @Min(value = 1900, message = "出生年份不能早于1900年")
    @Max(value = 2020, message = "出生年份不能晚于2020年")
    private Integer birthYear;

    @Size(max = 50, message = "职业长度不能超过50字符")
    private String occupation;

    private Integer age; // 计算字段，无需输入

    @Min(value = 50, message = "身高不能低于50cm")
    @Max(value = 250, message = "身高不能超过250cm")
    private Integer height;

    @Size(max = 1000, message = "健康描述不能超过1000字符")
    private String healthDescription;

    // Getters and Setters
    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getGender() {
        return gender;
    }

    public void setGender(String gender) {
        this.gender = gender;
    }

    public Integer getBirthYear() {
        return birthYear;
    }

    public void setBirthYear(Integer birthYear) {
        this.birthYear = birthYear;
    }

    public String getOccupation() {
        return occupation;
    }

    public void setOccupation(String occupation) {
        this.occupation = occupation;
    }

    public Integer getAge() {
        return age;
    }

    public void setAge(Integer age) {
        this.age = age;
    }

    public Integer getHeight() {
        return height;
    }

    public void setHeight(Integer height) {
        this.height = height;
    }

    public String getHealthDescription() {
        return healthDescription;
    }

    public void setHealthDescription(String healthDescription) {
        this.healthDescription = healthDescription;
    }
}